package cn.darkhorse.messystem.service;

import cn.darkhorse.messystem.pojo.SaasTeam;
import cn.darkhorse.messystem.vo.SaasTeamUserVO;
import cn.darkhorse.messystem.vo.SaasTeamVO;
import cn.darkhorse.messystem.vo.SysUserVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 班组表 服务类
 * </p>
 *
 * @author maoguanjun
 * @since 2024-04-27
 */
public interface SaasTeamService extends IService<SaasTeam> {
    /**
     * 查看班组
     * @param teamId
     * @return
     */
    SaasTeamVO view(Long teamId);

    /**
     * 删除班组
     * @param teamId
     * @return
     */
    boolean delete(Long teamId);

    /**
     * 保存
     * @param vo
     * @return
     */
    boolean saveSaasTeam(SaasTeam vo);

    /**
     * 列表
     * @return
     */
    List<SaasTeamVO> listAll();

    /**
     * 关联用户
     * @param vo
     * @return
     */
    boolean addJoinUser(SaasTeamVO vo);

    /**
     * 根据班组获取用户
     * @param teamId
     * @return
     */
    List<SaasTeamUserVO> getUserNameByTeamId(Long teamId);

    /**
     * 查询班组关联用户
     * @param userName
     * @param userPhone
     * @param teamName
     * @return
     */
    List<SysUserVO> getUserList(String userName, String userPhone,  String teamName);

    SysUserVO getUserByUserId(Long userId);

    List<SysUserVO> getUsersByUserId(List<Long> userId);
}
